import React, { Component } from 'react'
// react 5 还可用class编写
export default class News extends Component {
    constructor(props){
        super(props)
    }
    render() {
        // 用的props里边的match.params
        console.log(this.props)
        const { id,name  } = this.props.match.params
        return (
            <div>
                <h2>后端 我是函数的news {id}--{name}</h2>
            </div>
        )
    }
}
